import http from "@/utils/request";

export default {
    /**
     * 查询列表
     * @param  params
     * @returns
     */
    async getDataList(pageNo, pageSize, approveStatus, startDate, endDate) {
        return await http.get("/api/scyxrb/list", { pageNo, pageSize, approveStatus, startDate, endDate });
    },
    /**
    * 添加
    * @returns
    */
    async addData(params) {
        return await http.post("/api/scyxrb/add", params)
    },
    /**
    * 修改
    * @returns
    */
    async updateData(params) {
        return await http.put("/api/scyxrb/update", params)
    },
    //上传文件
    async importExcel(myfile) {
        // console.log(29999999);
        console.log(myfile.get("myfile"));

        return await http.upload("/api/fileAbout/fileUpload", { myfile })
    },

    //导入文件
    async batchImportExcel(filePath) {
        // console.log(typeof(filePath));
        // console.log(filePath.get("filePath"));
        return await http.upload("/api/scyxrb/batchInput", { filePath })
    },

    /**
    * 下载模板
    */
    async download(params) {
        return await http.get("/api/scyxrb/downLoadExcel", params)
    },
    //删除
    async delete(params) {
        return await http.delete("/api/scyxrb/delete", params)
    },


    async getShysyl(year,month) {
      return await http.get("/api/shysyl/list", { year,month });
    },


    async listToScyxrb(params) {
      return await http.get("/api/Jyjclyxhz/listToScyxrb", params);
    },
}
